The Art of Objects
Object-Oriented Design & Architecture
Source Code for Sample Applications
The following lists the source code for the sample applications derived
from the case studies and designs in the book. These applications
typically span more than one section in the book. In many cases readers
can easily extend the examples to construct real-life applications. For
copyrights information, please refer to the license file.
Exposing Objects Through Interfaces
pdm
A single interface is used to expose the Catalog-Part-Attribute class
hierarchy.
pdm2
Three interfaces are used to expose the Catalog-Part-Attribute class
hierarchy.
Interface Design Patterns
-
factory
A service factory following the object factory design pattern.
It is implemented with the TIE approach of CORBA.
-
bank
A server simulating an object wrapper for an individual bank system.
The interface design follows the object manager pattern.
ATM System Software Case Study
-
bank
A server simulating an object wrapper for an individual bank system.
The interface design follows the object manager pattern.
-
ATM Central Server - interface layer
The ATM Central Server interacts with the ATM clients and relays transaction
requests to individual banks. The interface design follows the object
factory pattern and uses an interface as a servant class. The interface
layer can be run separately from the persistent layer.
This implementation has only interface layer objects and no persistent
objects, some bank and account information is hard coded in the login method.
-
ATM Central Server - persistent layer
This is the persistent object layer of the ATM Central Server.
The core design is an association class, plus a number of collection managers
and containers.
-
ATM Central Server - full version
The full ATM Central Server combines the interface and persistent object
layers. It relies on the class files in the persistent layer.
-
iBank
iBank is a web front end to the ATM Central Server. It uses the
Model/View/Controller framework for web applications. It works together
with the bank and ATM Central Server as a four-tier system.
Shared Whiteboard Case Study
-
Shared whiteboard
A Shared Whiteboard that allows network users
to conduct an interactive discussion on a background image using graphic
markups and text annotations.
Required Software Packages
-
The client / server applications make use of VisiBroker,
which is a Java ORB from Inprise. An evaluation version can be downloaded
here.
-
The persistent object applications use PsePro,
which is a persistent storage engine from ObjectStore. An evaluation
version can be downloaded here.
-
The web application uses the Apache web server
with JServ servlet engine (under the Java Apache Project).
These free packages can be downloaded here.
-
The Java codes are compatible with JDK 1.2 or
higher (link).
Other Utilities
-
repeat.exe
A Windows utility that enables you to run a command several times.
The command line format is:
repeat N "command argument ..."
where N is an integer.
To run several sessions concurrently, do:
repeat N start "command argument ..."